                <div>
                    <span class="label"><?php echo __('Cliente')?>: </span>
                    <span>
                        <span class="oculto">
                            <input class="lectura" type="text" value="<?php echo $cliente->getId()?>"name="crm_parte_filters[cliente_id]" id="crm_parte_filters_cliente_id">
                        </span>
                        <input class="lectura" size="35px" type="text" 
                               value="<?php echo $cliente->getNombre().' '.$cliente->getApellidos()?>"
                               name="crm_parte_filters[cliente_vehiculo]" 
                               id="crm_parte_filters_cliente_vehiculo"
                        >                    
                    </span>
                </div>

                <div>
                    <span class="label"><?php echo __('Vehiculo')?>: </span>
                    <span>
                        <select name="crm_parte_filters[vehiculo_id]" id="crm_parte_filters_vehiculo_id">
                            <option value="" selected="selected"></option>
                            <?php foreach ($vehiculos as $unVehiculo): ?>
                                <option value="<?php echo $unVehiculo->getId()?>">
                                    <?php echo $unVehiculo?>
                                </option>
                            <?php endforeach; ?>
                       </select>
                    </span>
                </div>



<script type="text/javascript">
    $(document).ready(function() { 
                $("#crm_parte_filters_cliente_vehiculo").autocomplete({
                    source: "<?php echo url_for('contacto/ajaxClientes')?>",
                    minLength: 0,
                    select: function( event, ui ) {
                    $('#crm_parte_filters_cliente_id').val(ui.item.id);  
                    var cliente_id = ui.item.id;
                    var url = "<?php echo url_for('parte/actualizaBusquedaClienteId'); ?>"+"?cliente_id="+cliente_id;
                    $("#datosBusquedaCliente").load(url);

                        // !!! Important !!! 
                        // always return false to prevent standard browser submit and page navigation 
                    return false; 
                    }

                });
     });
</script>

<script type="text/javascript">
$('input[type="text"]').focus(function() {
    $(this).addClass("focus");
    $(this).parent().parent().addClass("focustr");
});
 
$('input[type="text"]').blur(function() {
    $(this).removeClass("focus");
    $(this).parent().parent().removeClass("focustr");
});

$('textarea').focus(function() {
    $(this).addClass("focus");
    $(this).parent().parent().addClass("focustr");
});
 
$('textarea').blur(function() {
    $(this).removeClass("focus");
    $(this).parent().parent().removeClass("focustr");
});

$('select').focus(function() {
    $(this).addClass("focus");
    $(this).parent().parent().addClass("focustr");
});
 
$('select').blur(function() {
    $(this).removeClass("focus");
    $(this).parent().parent().removeClass("focustr");
});

</script>

